package com.a.basis;

public class TestInvert {
    public static void main(String[] args) {
        int[] nums={3,4,6,7,8,9,1,2};
        String a="abc";
        for (int i = 0; i < nums.length/2; i++) {

            //nums[i](正数第几位)                       nums[nums.length-i](倒数第几位)
            int temp=nums[i];
            nums[i]=nums[nums.length-1-i];
            nums[nums.length-1-i]=temp;
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i]+"\t");
        }
    }


}
